package com.maimao.auth.client;

import com.maimao.api.sys.SysUserApi;
import com.maimao.auth.client.fallback.SysUserFallBackFactory;
import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.model.user.sys.vo.Permissions;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author MaoLin Wang
 * @date 2020/11/30 9:45 下午
 */
@FeignClient(contextId = "sysUserClient", value = ServiceContainer.USER_SERVICE, fallbackFactory = SysUserFallBackFactory.class, configuration = FeignInterceptor.class)
public interface SysUserClient {

    @GetMapping("/sys/user/permissions")
    Result<Permissions> getPermissionByUserName(@RequestParam("username") String username);


}
